package com.wgy.day30.递归;

/*
递归练习二:
通过递归 计算阶乘
即:1到n之间的乘积
*/
public class Demo03Recursion {
    public static void main(String[] args) {
        int j = ji(10);
        System.out.println(j);
    }

    public static int ji(int n) {
        if (n == 1) {
            return 1;
        }
        return n * ji(n - 1);
    }


}
